<template>


  <van-address-edit 
  show-delete 
  show-set-default 
  show-search-result 
  :area-columns-placeholder="['请选择', '请选择', '请选择']"
  :show-area="false"
  @save = 'onSave'
  >
  </van-address-edit>
</template>

<script setup>
import { userStore } from '@/store/userStore';
import { useRouter } from 'vue-router'

const ustore = userStore()
const router = useRouter()
//新增地址

//保存
function onSave(content) {
  console.log('add',content)
  console.address=content.addressDetail;
  ustore.addAddress(content)
  alert('保存成功')
  setTimeout(() => {
    router.back()
  }, 1000)
}

</script>